#include "user.h"

User* User::instancia = NULL;
std::string User::name = "";
std::string User::pass = "";
bool User::loguear = false;

User* User::getInstance(){
	if (instancia == NULL){instancia = new User;}
	return instancia;
}
void User::eliminar(){
	delete instancia;
	instancia = NULL;
}
bool User::isInstance(){return instancia!=NULL;}
void User::setName(const std::string& nombre){
	User::name = nombre;
}
void User::setPass(const std::string& password){
	User::pass = password;
}
const std::string& User::getName(){return User::name;}
const std::string& User::getPass(){return User::pass;}

bool User::shouldLog(){return User::loguear;}
void User::setShouldLog(bool b){User::loguear = b;}